-- CALC_DRAGON_SHADOW_BONUS

-- 计算神龙虚影奖励
-- @param user  玩家对象
return function(user)
    local bonus = {};

    -- 获取已获得神龙奖励的次数
    local bonusTimes = SkyInstanceM.getDragonShadowBonusTimes();

    -- 如果可以获得大奖
    if bonusTimes < 1 then
        table.insert(bonus, { 1, 8157, 1 });
    end

    local rand = DungeonM.getRandSeed("CALC_DRAGON_SHADOW_BONUS");
    local arr = {
        { ["bonus"] = { 2, "attack", 3 },  ["ratio"] = 25, },
        { ["bonus"] = { 2, "magic",  3 },  ["ratio"] = 25, },
        { ["bonus"] = { 2, "max_hp", 30 }, ["ratio"] = 25, },
        { ["bonus"] = { 2, "max_mp", 30 }, ["ratio"] = 25, },
    };
    table.insert(bonus, fetchElemBySeed(arr, rand)["bonus"]);

    return { ["bonus"] = bonus, };
end
